package cn.poco.pepsi.service.impl;

import java.io.InputStream;
import java.util.List;

import cn.poco.pepsi.bean.DiscutByArea;
import cn.poco.pepsi.service.IDiscutByArea;
import cn.poco.pepsi.util.UrlConnectionUtil;
import cn.poco.pepsi.util.UrlMatchUtil;
import cn.poco.pepsi.util.xmlpared.DiscutByAreaXmlparse;

public class DiscutByAresImpl implements IDiscutByArea {

	@Override
	public List<DiscutByArea> getDiscutByArea(String cd) throws Exception {
		List<DiscutByArea> list = null;
		String url = PATH.replace("#a", String.valueOf(cd));
		url=UrlMatchUtil.matchUrl(url);
		InputStream inSteam = UrlConnectionUtil.getRequest(url);
		list=DiscutByAreaXmlparse.getXml(inSteam);
		return list;
	}

}
